package com.example.demo.controller.vo;

import com.example.demo.entity.Doctor;
import com.example.demo.entity.DoctorFlow;

/**
 * @Author: WinstonDeng
 * @Description:
 * @Date: Created in 14:19 2020/4/13
 * @Modified by:
 */
public class DoctorFlowVO implements Comparable<DoctorFlowVO>{
    private String name;
    private String duty;
    private String description;
    private String honor;

    public DoctorFlowVO(){

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDuty() {
        return duty;
    }

    public void setDuty(String duty) {
        this.duty = duty;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getHonor() {
        return honor;
    }

    public void setHonor(String honor) {
        this.honor = honor;
    }

    @Override
    public String toString() {
        return "DoctorFlowVO{" +
                "name='" + name + '\'' +
                ", duty='" + duty + '\'' +
                ", description='" + description + '\'' +
                ", honor='" + honor + '\'' +
                '}';
    }

    protected int dutyToNumber(){
        if(duty.equals(DoctorFlow.DUTY_LEVEL1)){
            return 1;
        }else if(duty.equals(DoctorFlow.DUTY_LEVEL2)){
            return 2;
        }else if(duty.equals(DoctorFlow.DUTY_LEVEL3)){
            return 3;
        }
        return 0;
    }

    @Override
    public int compareTo(DoctorFlowVO o) {
        return this.dutyToNumber() - o.dutyToNumber();
    }
}
